# Contributor: Łukasz Jendrysik <scadu@yandex.com>
# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
# Maintainer: Celeste <cielesti@protonmail.com>
pkgname=goaccess
pkgver=1.9.2
pkgrel=0
pkgdesc="Real-time web log analyzer and interactive viewer"
options="!check" # no test suite
url="https://goaccess.io/"
arch="all"
license="MIT"
makedepends="ncurses-dev geoip-dev glib-dev libmaxminddb-dev"
subpackages="$pkgname-doc $pkgname-lang"
source="https://tar.goaccess.io/goaccess-$pkgver.tar.gz"

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--localstatedir=/var \
		--enable-geoip=mmdb \
		--enable-utf8
	make
}

package() {
	make DESTDIR="$pkgdir" install

	install -Dvm644 COPYING -t "$pkgdir"/usr/share/licenses/$pkgname/
}

sha512sums="
138fbe1e5970e43a9f6ae1934eb016c4a2cccdfbbe237eb3b505ac2c3b9536e11de76fac82c8d22d6ee74168784227b2eb425f35a3bc65f6e93fa973f88b6c94  goaccess-1.9.2.tar.gz
"
